import type { DepartData, OrderDetail, OrderPreData, OrderPreParams } from "@/types/consult"
import { request } from "@/utils/http"

// 医生科室列表
export const departmentListApi = ()=>{
  return request.get<null,DepartData[]>('/dep/all')
}

/**
 * 生成预支付订单
 */
export const preOrderApi = (params: OrderPreParams) => {
  return request.get<null, OrderPreData>('/patient/consult/order/pre', {
    params
  })
}

/**
 * 问诊订单详情
 */
export const orderDetailApi = (orderId: string) => {
  return request.get<null, OrderDetail>('/patient/consult/order/detail', { params: { orderId } })
}